from typing import *


class Solution:
    def maximumMedianSum(self, nums: List[int]) -> int:

        nums.sort(reverse=True)
        return sum(nums[i] for i in range(1, len(nums) // 2 + 1, 2))
